/**
 * pharma-model - 9 janv. 2011 guillaume
 */
package org.bspv.pharma.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Version;
import javax.validation.constraints.NotNull;

/**
 * @author guillaume
 */
@Entity
@Table(name = "STOCKLIST_DETAIL")
public class StocklistDetail implements Serializable {

    /**
     * serialVersionUID.
     */
    private static final long serialVersionUID = 5410519495793823294L;

    /**
     * Identifiant du détail de stock.
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    /**
     * Stock.
     */
    @NotNull
    @ManyToOne
    private Stocklist stocklist;
    /**
     * Emplacement correspondant à ce détail de stock.
     */
    @NotNull
    @ManyToOne
    private Place place;
    /**
     * Fourniture concernée.
     */
    @NotNull
    @ManyToOne
    private Supply supply;
    /**
     * Numéro de version.
     */
    @Version
    private Integer version;

    /**
     * @return the id
     */
    public final Long getId() {
        return id;
    }

    /**
     * @param id
     *            the id to set
     */
    public final void setId(final Long id) {
        this.id = id;
    }

    /**
     * @return the stocklist
     */
    public final Stocklist getStocklist() {
        return stocklist;
    }

    /**
     * @param stocklist
     *            the stocklist to set
     */
    public final void setStocklist(final Stocklist stocklist) {
        this.stocklist = stocklist;
    }

    /**
     * @return the place
     */
    public final Place getPlace() {
        return place;
    }

    /**
     * @param place
     *            the place to set
     */
    public final void setPlace(final Place place) {
        this.place = place;
    }

    /**
     * @return the supply
     */
    public final Supply getSupply() {
        return supply;
    }

    /**
     * @param supply
     *            the supply to set
     */
    public final void setSupply(final Supply supply) {
        this.supply = supply;
    }

    /**
     * @return the version
     */
    public final Integer getVersion() {
        return version;
    }

    /**
     * @param version
     *            the version to set
     */
    public final void setVersion(final Integer version) {
        this.version = version;
    }

}
